component.modals

bootbox

Bootbox Manage modals with JavaScript API

<div class="widget">
	<div class="widget-head">
		<h4 class="heading">Bootbox <span>Manage modals with JavaScript API</span></h4>
	</div>
	<div class="widget-body">
		<button id="modals-bootbox-alert" class="btn btn-primary">Alert</button>
		<button id="modals-bootbox-confirm" class="btn btn-primary">Confirm</button>
		<button id="modals-bootbox-prompt" class="btn btn-primary">Prompt</button>
		<button id="modals-bootbox-custom" class="btn btn-primary">Custom Dialog</button>
	</div>
</div>


Code

@import "http://localhost/shared/components/modules/admin/modals/assets/less/modals.less";
@import "http://localhost/shared/components/modules/admin/notifications/gritter/assets/lib/css/jquery.gritter.css";
@import "http://localhost/shared/components/modules/admin/notifications/gritter/assets/custom/less/gritter.less";
@import "assets/components/modules/admin/ui/buttons/assets/buttons.less";

Usage

  1. Create a new LESS file (eg. styles.less)
  2. Copy & paste the above imports in the LESS file.
  3. Place the file in your project's document root.
  4. Load the LESS file into the <head> section of your HTML document, before any JavaScript files:

    <link type="stylesheet/less" href="styles.less" />

    NOTE  All the styles from the CORE package also need to be imported in this file, before the component imports.

  5. If you'd like to include other components on the same page, don't create multiple LESS files, but add all the imports in one file. You can create a LESS file for each page with just the resources used for that specific page, or you could create and use a single LESS file for the entire project.
  6. In production, compile the LESS file and use the resulting minified CSS file in the HTML document.

Scripts

BODY You should include the following scripts at the end of the HTML document, right before the closing </body> tag.

<script src="assets/components/modules/admin/modals/assets/js/bootbox.min.js?v=v1.2.3"></script>
<script src="assets/components/modules/admin/modals/assets/js/modals.init.js?v=v1.2.3"></script>
<script src="assets/components/modules/admin/notifications/gritter/assets/lib/js/jquery.gritter.min.js?v=v1.2.3"></script>
<script src="assets/components/modules/admin/notifications/gritter/assets/custom/js/gritter.init.js?v=v1.2.3"></script>

modal-inline

<!-- Modal inline -->
<div class="modal modal-inline">
	<div class="modal-dialog">
		<div class="modal-content">

			<!-- Modal heading -->
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title">Modal header</h4>
			</div>
			<!-- // Modal heading END -->
			
			<!-- Modal body -->
			<div class="modal-body">
				<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
			</div>
			<!-- // Modal body END -->
			
			<!-- Modal footer -->
			<div class="modal-footer">
				<a href="#" class="btn btn-default">Just a button</a> 
				<a href="#modal-simple" data-toggle="modal" class="btn btn-primary">Open Live Modal</a>
			</div>
			<!-- // Modal footer END -->

		</div>
	</div>
	
</div>

<!-- Modal -->
<div class="modal fade" id="modal-simple">
	
	<div class="modal-dialog">
		<div class="modal-content">

			<!-- Modal heading -->
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h3 class="modal-title">Modal header</h3>
			</div>
			<!-- // Modal heading END -->
			
			<!-- Modal body -->
			<div class="modal-body">
				<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
			</div>
			<!-- // Modal body END -->
			
			<!-- Modal footer -->
			<div class="modal-footer">
				<a href="#" class="btn btn-default" data-dismiss="modal">Close</a> 
				<a href="#" data-dismiss="modal" class="btn btn-primary">Save changes</a>
			</div>
			<!-- // Modal footer END -->

		</div>
	</div>
	
</div>
<!-- // Modal END -->



Code

@import "http://localhost/shared/components/modules/admin/modals/assets/less/modals.less";
@import "http://localhost/shared/components/modules/admin/notifications/gritter/assets/lib/css/jquery.gritter.css";
@import "http://localhost/shared/components/modules/admin/notifications/gritter/assets/custom/less/gritter.less";
@import "assets/components/modules/admin/ui/buttons/assets/buttons.less";
@import "http://localhost/shared/components/modules/admin/modals/assets/less/modal-inline.less";

Usage

  1. Create a new LESS file (eg. styles.less)
  2. Copy & paste the above imports in the LESS file.
  3. Place the file in your project's document root.
  4. Load the LESS file into the <head> section of your HTML document, before any JavaScript files:

    <link type="stylesheet/less" href="styles.less" />

    NOTE  All the styles from the CORE package also need to be imported in this file, before the component imports.

  5. If you'd like to include other components on the same page, don't create multiple LESS files, but add all the imports in one file. You can create a LESS file for each page with just the resources used for that specific page, or you could create and use a single LESS file for the entire project.
  6. In production, compile the LESS file and use the resulting minified CSS file in the HTML document.

Scripts

BODY You should include the following scripts at the end of the HTML document, right before the closing </body> tag.

<script src="assets/components/modules/admin/modals/assets/js/bootbox.min.js?v=v1.2.3"></script>
<script src="assets/components/modules/admin/modals/assets/js/modals.init.js?v=v1.2.3"></script>
<script src="assets/components/modules/admin/notifications/gritter/assets/lib/js/jquery.gritter.min.js?v=v1.2.3"></script>
<script src="assets/components/modules/admin/notifications/gritter/assets/custom/js/gritter.init.js?v=v1.2.3"></script>